POV-Ray : Newsgroups : povray.advanced-users : #while loop help : Re: #while loop help Server Time
30 Jul 2024 00:27:49 EDT (-0400)
  Re: #while loop help  
From: ingo
Date: 3 Sep 2000 16:10:41
Message: <8FA4E57A0seed7@204.213.191.228>
Warp wrote:

>  Loops are so often misunderstood and misused that I should make an
>  entry about them in the VFAQ. I just don't know where to start and what 
>  to ask. 
>  I'll think about something.

Think about it with an absolute non-programmer mind.
When I first encouterd a loop, it took men an hour to realize that I had 
to do the incrementing myself. I expected it to be automatic.
It took me a day to figure out I had to reset the counter of the inner 
loop myself. For me it seemed very logical that once I had gone through 
the loop the counter would not exist anymore until the loop was enterd 
again.

Now that I'm slowly learning some python, i did it wrong twice in pov. In 
python it indeed is all (more or less) automatic.

while i in range(25):
  while j in range(25):
    do some tings here inside the loops

coninue program outside the loop


Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.